Part Number Hot Search : 
87759 RT9178 TMC454 PE9402 PQ3RD083 TLE4942C TLE4942C 2SC20
Product Description
Full Text Search
 

To Download AN1252 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 2009 microchip technology inc. ds01252a-page 1 AN1252 introduction microchip technology?s mrf49xa is a highly integrated rf transceiver, used in the 433, 868 and 915 mhz frequency bands. the transceiver uses fsk modulation internally. a transceiver is a device that can both transmit and receive. thus, the word ?transceiver?. a system that can send and receive data at the same time is called a full- duplex system. on the other hand, a system that can only send or receive at a time is called a half-duplex system. thus, half-duplex systems use only one frequency carrier and the two ends share the same frequency. full-duplex systems use two carrier frequencies, known as uplink frequency and downlink frequency. this document discusses what is required to successfully develop a half-duplex radio application using the microchip technology mrf49xa transceiver. for more information on this transceiver, please refer to the mrf49xa data sheet (ds70590). fsk short theory the most common radio modulation used in remote keyless entry (rke) systems is the amplitude shift keying (ask). data is transmitted by varying the amplitude of a fixed-frequency carrier. when data is encoded as maximum amplitude for a ? 1 ? or mark, and zero amplitude ? the power amplifier (pa) is switched off ? for a ? 0 ? or space, this type of modulation is also named on-off keying, or ook. this modulation format allows very simple and low-cost transmitter designs. another type of modulation is frequency shift keying (fsk). this is done by shifting the carrier?s frequency on either side of an average (or carrier) frequency. the amount by which the carrier shifts on either side of the carrier?s frequency is known as deviation. the fsk modulation has several advantages over the ask modulation. while the am modulation is very sensitive to variations of amplitude and noise, the fsk encoded transmissions are more immune to signal attenuation or other amplitude-based disturbance. although the apparent bandwidth is from f 0 ? ? f to f 0 + ? f, in reality, the bandwidth spreads larger than the span between f 0 ? ? f to f 0 + ? f, because the speed of transition between the two frequencies generates additional spectral content. in short, think of fsk modulation as a more reliable transmission medium having much less noise. in order to achieve a successful design, you will need a deeper understanding of the requirements of an fsk modulated radio link. figure 1: the combined spectrum generated by a ' 01010... ' pattern to see an example of what fsk looks like, take a look at figures 1 through 3. these plots are taken from a spectrum analyzer, a tool that plots amplitude (in db) versus frequency (linearly, in hz). each of the plots has about an 80 db range, with a frequency range or ?span? of 320 khz (since there are 10 divisions, this is 32 khz per division). the plot is ?centered? at 915 mhz. this means perfectly aligned between the left and right side of the plot, at 915 mhz. left of this point is the lower frequency and to the right is the higher frequency (at 32 khz per division). figure 1 shows what the frequency plot looks like for our example design when its transmitter generates a continually alternating stream of ones and zeros (a 01010101 ? pattern). the green line is from the spectrum analyzer and shows two peaks. since fsk means shifting the frequency based on the symbol sent (a ? 1 ? or a ? 0 ?), there are two peaks. author: cristian toma microchip technology inc. interfacing the mrf49xa transceiver to pic ? microcontrollers free datasheet http://
AN1252 ds01252a-page 2 ? 2009 microchip technology inc. the red line represents the baseband filter response of the receiver, discussed later in this document. in this design, the receiver portion needs the green line to fit inside of each area between the red lines. as you can see, each green peak is reasonably centered under each area, showing that the transceiver performance should function correctly. we will show mismatch examples later. figure 2: the spectrum generated by a ? 0 ? symbol figure 2 shows what the output looks like when only a ? 0 ? is transmitted. note that only one peak is shown, the lower frequency peak exists only in this example. figure 3: the spectrum generated by a ? 1 ? symbol figure 3 shows the result of just transmitting a ? 1 ? symbol, which has only the higher frequency peak as expected. control interface mrf49xa uses a 4-line spi interface to communicate with the host microcontroller/system. these lines are sdo, sdi, clk and cs . the spi port is used for the control interface and for sending data to and from the 16-bit data tx register/rx fifo (if the txden/fifoen bit is enabled in the general configuration register). in order to use a mrf49xa radio device, it has to be initialized first. initializing the device is done by writing commands to the internal register through the control interface. there are 16 control (commands) and one status read register. the explanation of these registers can be read from the mrf49xa data sheet. commands to the transceiver are sent serially. data bits on pin sdi are shifted into the device upon the rising edge of the clock on pin sck whenever the chip select pin, cs , is low. when the cs signal is high, it initializes the serial interface. all registers consist of a command code, followed by a varying number of parameters or data bits. all data are sent, msb first (e.g., bit 15 for a 16-bit register). on a power-on-reset, the circuit sets the default values for all the registers. the transceiver will generate an interrupt request to the host microcontroller by pulling the iro line low if one of the following events takes place: ? tx register is ready to receive the next byte ? rx fifo has received the pre-programmed amount of bits ? fifo overflow/tx register underrun (txurow overflow in receive mode and underrun in transmit mode) ? negative pulse on interrupt input pin, int ? wake-up timer time-out ? supply voltage below the pre-programmed value is detected ? power-on reset after receiving an interrupt request, the host microcontroller identifies the source of the interrupt by reading the status bits. device initialization the device features a power-on-reset circuit, which has a time-out of 100 ms. during this time, the oscillator should have enough time to start the oscillations and reach a point of stability. in figure 4, signal 1 (yellow) is the clk output (1 mhz), signal 2 (green) is the waveform at the crystal output and signal 3 (violet) is v dd . this oscilloscope print indicates that, after applying the v dd voltage to the device, it takes 31.1 ms for the crystal to start oscillating and stabilize and for the digital circuitry to begin operation. spi commands sent before the por free datasheet http://
? 2009 microchip technology inc. ds01252a-page 3 AN1252 time-out are ignored. thus, after power-up, a delay of at least 100 ms should be provided. alternatively, the host can pool the reset line. figure 4: device initialization buffered data receive if the receive fifo is enabled, the received data is clocked into the 16-bit buffer. the receiver starts to fill the fifo when the synchronization pattern circuit has detected a valid data packet. this prevents the fifo from being loaded by random data. when the fifo has reached a predefined level of loading, then a signal is present on the fint pin (pin 7 on the device, active- high). a logic level ? 1 ? on this pin means that the number of bits in the rx fifo has reached the pre- programmed limit. the level at which the rf device will generate an interrupt can be set by means of the fifo and the reset mode configuration register. this value is typically set to 8 bits (one byte) to allow a byte-by- byte loading of the fifo during the transmit/receive process. this is true only in fifo mode, when bit fifoen is set in the general configuration register. an spi buffer read will cause the rx fifo to reach a lower number of bits, and the fint pin to go back to the logic level zero. when the fsel line is low, the fifo output is connected to the sdo pin and its content can be clocked out. figure 5: buffered mode in addition to the buffered mode, the mrf49xa device can be used in a non-buffered mode in which pin 6 (fsk/data/ fsel ) is the tx data input pin in transmit mode, while, in receive mode, it is the rx data output. pin 7 (rclkout/fcap/fint) is the rx data clock output. buffered data transmit in this mode, data is clocked into one of the two 8-bit data registers forming a 16-bit register. the transmitter starts to send data into the air from the first register as soon as the txcen bit is set with the in the power management configuration register. these two registers contain an initial value of 0xaa and this value can be used to generate a preamble to a data packet. during the transmitting process, the sdo pin must be monitored (sdo goes high) if the data register is ready to receive another byte from the host microcontroller. radio link requirements for an fsk modulated radio link there is a set of a few basic parameters to describe the link itself: - data rate -deviation - rx baseband bandwidth - crystal accuracy (frequency reference) note: the user must pay attention when using these registers as, at the initial state, these registers already contain data. also, the transmitter should not be turned off before the last byte in the register has been sent. to meet this requirement, the last byte loaded to the fifo is a dummy byte to allow the last byte to be sent. at the next sdo pin rise (fifo ready for the new byte), the transmitter can be turned off. cs sck fsel sdo fint 01 234 fifo read out fifo cut f0+1 f0+2 f0+3 f0+4 free datasheet http://
AN1252 ds01252a-page 4 ? 2009 microchip technology inc. data rate depending on the application, it can be a low-speed or a high-speed radio link. low-speed is typically used in applications where only short data packages need to be sent with very long delays between transmissions (hours to days). high-speed is used only when the device needs to send large amounts of data, such as in radio modems, digital audio links, etc. a low data rate will allow a longer range for the radio link due to less noise in the receiver demodulation circuit. on the other hand, a high-speed link can also be used to provide a much shorter data packet and, thus, a longer battery life (if powered by any). deviation to calculate the recommended deviation, you need to know the data rate and the crystal accuracy. as a rule of thumb, the deviation must be bigger than the data rate. then, you must also provide some space for the rx to tx frequency offset (which is tunable and is discussed later in the document). the minimum recommended deviation is 30 khz. rx baseband bandwidth this is defined by the crystal accuracy and by the range requirement. the longer the needed range, the smaller the baseband bandwidth (in order to filter the noise). crystal accuracy use a low ppm accuracy crystal. a better accuracy of the crystal allows for less tx to rx offset, smaller deviation, and baseband bandwidth. a good crystal should have a ppm value of 40 ppm. example calculation data rate 9.6 kbps, crystal accuracy 40 ppm, 915 mhz band. what are the deviation and baseband bandwidth? equation 1: equation 2: hence, according to the standard frequency consideration, the closest deviation possible is 90 khz. equation 3: the closest possible baseband bw is 200 khz. frequency offset in a radio link, the transmitter and the receiver are working on the same frequency. only one device can transmit at one time and the other must receive. once the transmission is done, they can change roles and send back data (i.e., send back an acknowledgement). even if the two ends are, theoretically, using the same frequency, in practice there will be a finite frequency offset. the rx-tx frequency offset can be caused by differences in the reference frequency. this is generated by the crystal oscillator. to minimize this frequency error, it is recommended to use the same type of crystal on both sides of the radio link and, as much as possible, the same pcb layout for the crystal reference section. to determine the actual rx-tx offset, the use of a high-precision frequency counter is recommended. to measure the oscillator frequency, connect the measuring probe to the clkout (pin 8) of both the rx and tx units. do not connect the probe directly to the crystal pin, as the probe itself has an internal capacitance and the measurement process will modify the reference frequency. the clkout of the device gives a frequency divided by a default value of ten (it can be programmed to other values) from the reference oscillator frequency. to disable clkout, set the clkoen bit from the power management configuration register. note: the ppm value of a crystal defines its accuracy. it stands for parts-per-million. the lower the ppm value, the better the crystal accuracy. the frequency error generated by a crystal can be calculated with the following formula: where f o is the crystal nominal frequency. f 0 40 ppm 10 6 ---------------- - * 915 * 10 6 36.6 khz = = deviation = data_rate + 2* ? f 0 + 10 * 10 3 hz = = 9600 + 2*36600 + 10 * 10 3 hz = 92.800 khz baseband bw = deviation*2 ? 10 * 10 3 hz = = (90*2 ? 10)* 10 3 hz = 170 khz f 0 ppm _ value * f 0 10 6 -------- - = free datasheet http://
? 2009 microchip technology inc. ds01252a-page 5 AN1252 the actual frequency can be calculated using the formula below: equation 4: a 30 ppm, 10 mhz crystal will generate a maximum error of: equation 5: thus, a maximum frequency error of: equation 6: adjusting the rx-tx frequency offset can be done using the general configuration register and changing the crystal load capacitance. this allows small changes in the reference frequency. adjust the crystal load capacitance in order to get the same frequency on both devices ? as close as possible. figure 6: example of badly tuned transmitter in figure 6, we have the example of a badly tuned transmitter. here we see that the center frequency is misaligned. the red lines represent the receiver baseband filter response. as you can clearly see, a radio link cannot be established in this case, since the receiver cannot interpret the ? 1 ? and the ? 0 ? symbols. the amplitudes of the signals are not of interest here and are shown only for illustration purposes. conclusion mrf49xa is a highly integrated rf transceiver. it requires only a few external components and can be controlled via an spi interface. thus, mrf49xa is ideal for low-power, short-range radio communications, where the host system is a microcontroller, such as microchip?s pic ? microcontrollers. f ref frequency mhz [] () * 91.5 = for 915 mhz: f ref frequency mhz [] () * 86.8 = for 868 mhz: f ref frequency mhz [] () * 43.3 = for 433 mhz: f 0 crystalaccuracy ppm [] 10 6 -------------------------------------------------------------- - * xtalfrequency mhz [] * 10 6 = 30 10 6 -------- - * 10 * 10 6 300 hz = = f 0 frequency mhz [] 10 --------------------------------------------- =* 915 mhz = 27.45 khz where the transmissionband is 868 or 915, depending on the frequency setting. xtalfrequency mhz [] * 10 6 f 0 ?? ?? free datasheet http://
AN1252 ds01252a-page 6 ? 2009 microchip technology inc. faqs q1: i cannot establish a radio communication. the two modules (tx and rx) work only if they are placed very close to each other (a few inches). a1: using a frequency counter, check the clock output from the mrf49xa clkout (pin 8). align the reference frequency as close as possible (using the general configuration register) on both ends of the radio link. do not place the probe on the rfxtal pad, as the probe also has some internal capacitance and the measurement process will shift the actual frequency. q2: transmission only works in one direction. reception works in both directions. a2: this is most likely a hardware malfunction. try to establish a radio link with another identical unit. for example, a base station talking to another base station and/or a remote key fob talking to another key fob. the antenna needs a middle connection to the v dd line. check if this is present. q3: what are the minimum test/measurement tools that i need in order to develop a system like the one described here? a3: you shouldn't need any special rf tool to get it working. if it still doesn't work, go through this document again. free datasheet http://
? 2009 microchip technology inc. ds01252a-page 7 AN1252 appendix a: source code due to size considerations, the complete source code for this application note is not included in the text. a complete version of the source code, with all required support files, is available for download as a zip archive from the microchip web site at: www.microchip.com free datasheet http://
AN1252 ds01252a-page 8 ? 2009 microchip technology inc. notes: free datasheet http://
? 2009 microchip technology inc. ds01252a-page 9 information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. it is your responsibility to ensure that your application meets with your specifications. microchip makes no representations or warranties of any kind whether express or implied, written or oral, statutory or otherwise, related to the information, including but not limited to its condition, quality, performance, merchantability or fitness for purpose . microchip disclaims all liability arising from this information and its use. use of microchip devices in life support and/or safety applications is entirely at the buyer?s risk, and the buyer agrees to defend, indemnify and hold harmless microchip from any and all damages, claims, suits, or expenses resulting from such use. no licenses are conveyed, implicitly or otherwise, under any microchip intellectual property rights. trademarks the microchip name and logo, the microchip logo, dspic, k ee l oq , k ee l oq logo, mplab, pic, picmicro, picstart, rfpic and uni/o are registered trademarks of microchip technology incorporated in the u.s.a. and other countries. filterlab, hampshire, hi-tech c, linear active thermistor, mxdev, mxlab, seeval and the embedded control solutions company are registered trademarks of microchip technology incorporated in the u.s.a. analog-for-the-digital age, appl ication maestro, codeguard, dspicdem, dspicdem.net, dspicworks, dsspeak, ecan, economonitor, fansense, hi-tide, in-circuit serial programming, icsp, mindi, miwi, mpasm, mplab certified logo, mplib, mplink, mtouch, octopus, omniscient code generation, picc, picc-18, picdem, picdem.net, pickit, pictail, pic 32 logo, real ice, rflab, select mode, total endurance, tsharc, uniwindr iver, wiperlock and zena are trademarks of microchip technology incorporated in the u.s.a. and other countries. sqtp is a service mark of microchip technology incorporated in the u.s.a. all other trademarks mentioned herein are property of their respective companies. ? 2009, microchip technology incorporated, printed in the u.s.a., all rights reserved. printed on recycled paper. note the following details of the code protection feature on microchip devices: ? microchip products meet the specification cont ained in their particular microchip data sheet. ? microchip believes that its family of products is one of the most secure families of its kind on the market today, when used i n the intended manner and under normal conditions. ? there are dishonest and possibly illegal methods used to breach the code protection feature. all of these methods, to our knowledge, require using the microchip produc ts in a manner outside the operating specif ications contained in microchip?s data sheets. most likely, the person doing so is engaged in theft of intellectual property. ? microchip is willing to work with the customer who is concerned about the integrity of their code. ? neither microchip nor any other semiconduc tor manufacturer can guarantee the security of their code. code protection does not mean that we are guaranteeing the product as ?unbreakable.? code protection is constantly evolving. we at microchip are co mmitted to continuously improvin g the code protection features of our products. attempts to break microchip?s code protection feature may be a violation of the digital millennium copyright act. if such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that act. microchip received iso/ts-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in chandler and tempe, arizona; gresham, oregon and design centers in california and india. the company?s quality system processes and procedures are for its pic ? mcus and dspic ? dscs, k ee l oq ? code hopping devices, serial eeproms, microperipherals, nonvolatile memory and analog products. in addition, microchip?s quality system for the design and manufacture of development systems is iso 9001:2000 certified. free datasheet http://
ds01252a-page 10 ? 2009 microchip technology inc. americas corporate office 2355 west chandler blvd. chandler, az 85224-6199 tel: 480-792-7200 fax: 480-792-7277 technical support: http://support.microchip.com web address: www.microchip.com atlanta duluth, ga tel: 678-957-9614 fax: 678-957-1455 boston westborough, ma tel: 774-760-0087 fax: 774-760-0088 chicago itasca, il tel: 630-285-0071 fax: 630-285-0075 cleveland independence, oh tel: 216-447-0464 fax: 216-447-0643 dallas addison, tx tel: 972-818-7423 fax: 972-818-2924 detroit farmington hills, mi tel: 248-538-2250 fax: 248-538-2260 kokomo kokomo, in tel: 765-864-8360 fax: 765-864-8387 los angeles mission viejo, ca tel: 949-462-9523 fax: 949-462-9608 santa clara santa clara, ca tel: 408-961-6444 fax: 408-961-6445 toronto mississauga, ontario, canada tel: 905-673-0699 fax: 905-673-6509 asia/pacific asia pacific office suites 3707-14, 37th floor tower 6, the gateway harbour city, kowloon hong kong tel: 852-2401-1200 fax: 852-2401-3431 australia - sydney tel: 61-2-9868-6733 fax: 61-2-9868-6755 china - beijing tel: 86-10-8528-2100 fax: 86-10-8528-2104 china - chengdu tel: 86-28-8665-5511 fax: 86-28-8665-7889 china - hong kong sar tel: 852-2401-1200 fax: 852-2401-3431 china - nanjing tel: 86-25-8473-2460 fax: 86-25-8473-2470 china - qingdao tel: 86-532-8502-7355 fax: 86-532-8502-7205 china - shanghai tel: 86-21-5407-5533 fax: 86-21-5407-5066 china - shenyang tel: 86-24-2334-2829 fax: 86-24-2334-2393 china - shenzhen tel: 86-755-8203-2660 fax: 86-755-8203-1760 china - wuhan tel: 86-27-5980-5300 fax: 86-27-5980-5118 china - xiamen tel: 86-592-2388138 fax: 86-592-2388130 china - xian tel: 86-29-8833-7252 fax: 86-29-8833-7256 china - zhuhai tel: 86-756-3210040 fax: 86-756-3210049 asia/pacific india - bangalore tel: 91-80-3090-4444 fax: 91-80-3090-4080 india - new delhi tel: 91-11-4160-8631 fax: 91-11-4160-8632 india - pune tel: 91-20-2566-1512 fax: 91-20-2566-1513 japan - yokohama tel: 81-45-471- 6166 fax: 81-45-471-6122 korea - daegu tel: 82-53-744-4301 fax: 82-53-744-4302 korea - seoul tel: 82-2-554-7200 fax: 82-2-558-5932 or 82-2-558-5934 malaysia - kuala lumpur tel: 60-3-6201-9857 fax: 60-3-6201-9859 malaysia - penang tel: 60-4-227-8870 fax: 60-4-227-4068 philippines - manila tel: 63-2-634-9065 fax: 63-2-634-9069 singapore tel: 65-6334-8870 fax: 65-6334-8850 taiwan - hsin chu tel: 886-3-6578-300 fax: 886-3-6578-370 taiwan - kaohsiung tel: 886-7-536-4818 fax: 886-7-536-4803 taiwan - taipei tel: 886-2-2500-6610 fax: 886-2-2508-0102 thailand - bangkok tel: 66-2-694-1351 fax: 66-2-694-1350 europe austria - wels tel: 43-7242-2244-39 fax: 43-7242-2244-393 denmark - copenhagen tel: 45-4450-2828 fax: 45-4485-2829 france - paris tel: 33-1-69-53-63-20 fax: 33-1-69-30-90-79 germany - munich tel: 49-89-627-144-0 fax: 49-89-627-144-44 italy - milan tel: 39-0331-742611 fax: 39-0331-466781 netherlands - drunen tel: 31-416-690399 fax: 31-416-690340 spain - madrid tel: 34-91-708-08-90 fax: 34-91-708-08-91 uk - wokingham tel: 44-118-921-5869 fax: 44-118-921-5820 w orldwide s ales and s ervice 03/26/09 free datasheet http://


▲Up To Search▲   

 
Price & Availability of AN1252

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X